<%
/*Auther name      : Frederic Anand
  file name        : 500.jsp
  date modified    : 17-Feb-2009
  revision history :
*/
%>
<html>
<body>
	<div id="definition">
		<a href="#" class="lbAction" rel="deactivate">
		<img src="../images/closelabel.gif" style="float:right;border:0px solid red"/>
		</a>   
			<%
			  java.sql.Connection conn = null;
			  java.sql.Statement  stat = null;	
			  Class.forName( "com.mysql.jdbc.Driver");	
			  conn = java.sql.DriverManager.getConnection("jdbc:mysql://localhost:3306/ba3602_droikclassifieds","ba3602_portal","p0rtal" );		
			  stat = conn.createStatement();   		
			  java.sql.ResultSet rs = stat.executeQuery("select city_id, cityname from lookup_city;");
			%>			
			<table border="1" style="margin-left:30px;margin-top:30px" width="90%">
			<%   
			  int i = 0;		
		  	  while (rs.next())
		  	  {
			  	   int city_id = rs.getInt(1);			
			  	   String cityname = rs.getString(2);						
			  	   if ( i % 3 == 0 )
				   {     
			%>     		
					<tr>     
			<%     	   }	     
			%>                 	<td class="tabletext">           	      
							<a onclick="parent.setSelectedCity('<%=city_id%>','<%=cityname%>')"><%=cityname%></a>
						</td>	 
			    <%				
						if ( i % 3 == 0 )         	
						{     
			    %>     
					<%     		
						}	     		
						i++;      	
			  }     	%>    
			</table>
	</div>   
	<%conn.close();%>
</body>
</html>